<?php

    require_once Core_IO_Path::combine(SERUM_MODULE_PATH, 'Base', 'controllers', 'admin', 'IndexController.php');

    /**
     * @package      Modules
     * @subpackage   Pages_Controllers_Admin
     *
     * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
     */
     class Pages_Controllers_Admin_Fileiterator extends Base_Controllers_Admin_Index
     {

    ////////////////////////////////////////////////////////////////////////////
    //                              Methods                                   //
    ////////////////////////////////////////////////////////////////////////////

        /**
         * Returns files list
         *
         * @return      Core_Controller_Response_Abstract
         */
        public function getFileList()
        {
            $rep        = $this->_getResponse('json');
            $iterator   = new Base_Classes_IO_FileIteratora(array(Core_IO_Path::combine(
                                                                                PROJECT_WWW_PATH,
                                                                                'skin',
                                                                                'frontend',
                                                                                'templates'),
                                                                  Core_IO_Path::combine(
                                                                                SERUM_WWW_PATH,
                                                                                'skin',
                                                                                'frontend',
                                                                                'templates')));
            $rep->setResponseContent($iterator->iterate());

            return $rep;
        }
    }
